let timer

const routerBack = {
  methods: {
    routerBack() {
      timer = setTimeout(() => {
        this.$router.push('/home')
      }, 800)
    },
  },
  beforeDestroy() {
    clearTimeout(timer)
  },
}

export default routerBack
